import { defineStore } from 'pinia';
import { StoreName } from "./store-name";

export const useMenuStore = defineStore(StoreName.MENU, {
  state: () => {
    return {
      menuList: [
        {
          title: '首页',
          index: '/dashboard/home',
          icon: 'House'
        },
        {
          title: 'MD文档',
          index: '/dashboard/md',
          icon: 'Document'
        },
        {
          title: '系统设置',
          index: 'system-config',
          icon: 'Setting',
          children: [
            { title: '角色管理', index: '/dashboard/system-config/role-manager' },
            { title: '权限管理', index: '/dashboard/system-config/auth-manager' },
            { title: '用户管理', index: '/dashboard/system-config/user-manager' },
            { title: '操作日志', index: '/dashboard/system-config/done-log' },
          ]
        },
        {
          title: 'SQL调试',
          index: '/dashboard/sql-test',
          icon: 'data-analysis'
        }
      ],
    };
  },
  getters: {
    getMenuList: (state) => state.menuList,
  }
});